<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/jquery.scrollTo.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
//				$.scrollTo("#aa",1000);
				$(".top").click(function(){
					var top= $(window).scrollTop();
					$.scrollTo(0,top/2);
				})
			})
		</script>
		<style type="text/css">
			.top{
				width: 50px;
				height: 50px;
				background: #fff;
				position: fixed;
				bottom: 20px;
				right: 20px;
			}
		</style>
	</head>
	<body>
		<div class="top">
			
		</div>
		<button id="aa" style="position: absolute;">测试</button>
		<div id="div1" style="height: 500px;background: #000;"></div>
		<div id="div2" style="height: 500px;background: #F00;"></div>
		<div id="div3" style="height: 500px;background: #0F0;"></div>
		
		<div id="div4" style="height: 500px;background: #00F;"></div>
		<div id="div5" style="height: 500px;background: #FF0;"></div>
		
		<div id="div6" style="height: 500px;background: #0FF;"></div>
		
	</body>
</html>
